<?php $this->_extends('_layouts/main_layout'); ?>

<?php $this->_block('title'); ?>
	Unsubscribe Newsletter
<?php $this->_endblock(); ?>

<?php $this->_block('keywords');?>
<meta name="keywords" content="<?php echo $site['keywords']; ?>" />
<?php $this->_endblock();?>

<?php $this->_block('description');?>
<meta name="description" content="<?php echo $site['description']; ?>" />
<?php $this->_endblock();?>

<?php $this->_block('content'); ?>
<div class="mt">
	<?php $this->_element('social'); ?>
</div>
<div class="mm help">
	<div class="topad">
		<?php if (!empty($user)) { ?>
		<?php echo str_replace('[[USER_ID]]', $user['id'], $site['ad_top']);?>
		<?php } ?>
	</div>
	<div class="clear" style="height: 10px"></div>
	<div class="left white" style="width: 600px;">
		<div class="title">Unsubscribe</div>
		<p>Unsubscribing will permernantly disable your account. </p>
		<form action="<?php echo url('help/unsubing'); ?>" method="post">
			<div class="tr">
					<label style="width:80px;float:left;">Email:</label>	<input type="text" name="email" />
			</div>
			<div class="tr">
					<label style="width:80px;float:left;">Password:</label>	<input type="password" name="password" />
			</div>
			<div class="tr">
					<input type="checkbox" name="unsub" id="unsub"/>I understand after unsubscribe I can't login any longer.
			</div>
			<div class="tr">
					<span class="hidden error_info">You haven't checked the unsubcribe option</span>
			</div>
			<div class="tr">
					<input type="image" src="<?php echo $img_url;?>Unsub.png" id="submit"/>
			</div>
		</form>
	</div>
	<div class="right rightad">
		<?php echo $site['ad_right']; ?>
	</div>
	<div class="clear" style="height: 20px;"></div>
	<div class="bottomad">
		<?php echo $site['ad_bottom']; ?>
	</div>
</div>
<div class="mb"></div>
<script type="text/javascript">
	$(function(){
		$('#submit').click(function(){
			if($('input:checked').length)
				return true;
			else
				$('.hidden').show();
			return false;
		});
		$('#unsub').change(function(){
			if($('#unsub').prop('checked'))
				$('.hidden').hide();
		});
	});
</script>
<?php $this->_endblock(); ?>